This application is based on application No. 9-340671 filed in Japan on Nov. 25, 1997, the content of which is hereby incorporated by reference.
1. Field of the Invention
The present invention relates to an image processing device for binarizing multi-level image data.
2. Description of the Related Art
In a conventional image processing device for processing image data to form an image, data processing is executed to binarize brightness of an image including consecutive gradient levels as values of [0] and [1]. Conventional data processing executed in such an image processing device is described below.
FIG. 17 is a block diagram briefly illustrating the general construction of an image processing device.
The image processing device includes MPU 1 for overall control of the device, image input unit 2 comprising photoelectric conversion elements such as charge-coupled device (CCD) and the like and a drive system for driving said photoelectric conversion elements to scan the image of a document, analog-to-digital (A/D) converter 3 for converting analog image data obtained by said image input unit 2 to digital data, Log converter 4 for logarithmic conversion, sharpness correction (MTF correction) unit 5 for correcting sharpness, gamma correction unit 6 for gamma correction, image binarizer 7 for binarizing image data, and image memory 8 for storing an image based on data obtained from image binarizer 7. Each unit from image input unit 2 through image memory 8 is connected to MPU 1 via the MPU system bus, and said units are connected serially via the image data bus. These units are controlled by MPU 1 via the MPU system bus, and the various units exchange image data through the image data bus.
The various units of the aforesaid image processing device are described below. Image input device 2 generates standardized analog signals by scanning a current document comprising, for example, continuous gradient image and line image and the like, and A/D converter 3 quantizes said standardized analog signals as continuous gradient reflection data possessing values of8-bits (256 gradient levels) for one pixel. The Log converter 4 calculates b-bit continuous gradient density data having a logarithmic relationship to the continuous gradient reflection data, and sharpness correction unit 5 executes sharpness correction of the image by means of the continuous gradient density data using a digital filter such as a Laplacian filter or the like.
Gamma correction unit 6 accomplishes gamma correction by means of non-linear gamma correction data using a 256 word8-bit LUT (Look Up Table) RAM to realize desired gamma characteristics of the overall image processing device by correcting the difference of the gradient curves of the image input unit 2 and the image recording unit 8, or to realize desired gamma characteristics of the operator of the image processing device.
Image binarizer 7 converts the gamma corrected 8-bit continuous gradient density data to 1-bit binary data in accordance with the brightness using an area gradient binarization method such as an error diffusion method or the like. The image is recorded on a recording medium by the image recording unit 8 such as an electrophotographic printer, inkjet printer or the like based on the 1-bit binary data obtained above.
The error diffusion method used in the aforesaid image binarizing unit 7 of the image processing device disperses the error by calculating the density difference (binarization error) of each pixel of the input image density and output image density, and executes specific weighting of the calculation result relative to the peripheral pixels of the target pixel, and adds the image density of the target pixel.
This error diffusion method was reported by W. Floyd and L. Steinberg in the publication "An adaptive algorithm for spatial gray scale," SID; 17; pp. 75.about.77(1976).
In the binarization process, input multi-level image data are designated f(x,y) in equation (1) of Section 1, output binary image data are designated (x,y) in equation (2), and binarization error Exy is represented in equation (3).
The error diffusion method reduces error by averaging the value Exy, and accomplishes correction by adding the weighted average error of peripheral error relative to the input multi-level image data. The weighted average error Eavexy is expressed in equation (4). The peripheral pixels in the main scan direction and subscan direction relative to a target pixel are specified by the values k and l. In general, the weighted coefficients mk and 1 become larger nearer the target pixel, and the value S is determined using 5 peripheral pixels in the main scan direction and 3 peripheral pixels in the subscan direction.
In this way the corrected image data of the target pixel can be expressed by equation (5), and the corrected image data f'(x,y) can be binarized by a predetermined threshold value Th to obtain g(x,y) of equation (6).
The binarization error Exy is derived from the standardized binary image data g'(x,y) obtained from corrected image data f'(x,y) and binary image data g(x,y) as shown in equation (7). In general, the standardized binary image data g'(x,y) is expressed by equation (8), and the values HB and LB refer to the upper limit (=1) and lower limit (=0) of the dynamic range of the respective pixels.
Equations (1).about.(8)
f(x,y)(0.ltoreq.f(x,y).ltoreq.1) (1) EQU g(x,y)(=0 or 1) (2) EQU E.sub.xy =f(x,y)-g(x,y) (3)
##EQU1## f'(x,y)=f(x,y)+E.sub.avexy (5)
##EQU2## E.sub.xy =f'(x,y)-g'(x,y) (7)
##EQU3##
In this way, the binarization error Exy and weighted average error Eavexy can be expressed by equations (9) and (10) of Section 2, and then are used to construct a feedback loop as shown in FIG. 18.
Equations (9).about.(10)
E.sub.xy =f(x,y)+E.sub.avexy -g(x,y) (9)
##EQU4##
The image binarizer 7 of a conventional image processing device which binarizes image data using the aforesaid error diffusion method is described below. FIG. 18 is a block diagram illustrating the image binarizer 7 in a conventional image processing device.
Image binarizer 7 comprises an image data correction unit 9 for correcting multi-level image data f(x,y) to corrected image data f'(x,y), image data binarizer 10 for binarizing corrected image data f'(x,y) to binary data g(x,y), selector 12 for obtaining standard binary image data g'(x,y) from said binary image data g(x,y), binarization error calculator 11 for calculating binarization error Exy from the corrected image data f(x,y) and standard binary image data g'(x,y), error memory unit 14 for temporarily storing binarization error across a predetermined region, and error weighting filter 13 for calculating the weighted average error Eavexy by weighting and averaging binarization error Exy across a predetermined region. The aforesaid error diffusion method is executed by the image binarization device 7 of the aforesaid construction.
The disadvantages described below arise from the previously described error diffusion method. A first disadvantage of the error diffusion method is the poor reproducibility of line/text images, particularly fine lines. This disadvantage generates image gaps in the propagation of the binarization error due to the fine width of the line image, and generates dots as the cumulative error caused by inversion of error codes causes the line to separate from the region, thereby producing distortion of the line image.
A second disadvantage of the error diffusion method is the generation of unique reticulations (texture) when processing an image of uniform density as in the case of photographic images. This disadvantage disperses error in a specific pattern in images of uniform density.
In order to avoid the aforesaid disadvantages, art has been proposed for controlling the direction of dispersion by controlling the weighting coefficients used in the filtering process as random numbers, art has been proposed for controlling the amount of dispersion by resetting the cumulative error, and art has been proposed to accomplish a filtering process of the binarized error data using a median filter or filter suitable for frequency characteristics of the generated reticulation patterns, and binarization processing using post-processed error data and input image data as disclosed in Japanese Laid-Open Patent Application No. SHO-63-214079.
Although the aforesaid art is effective for images of specific document such as line/text images and photographic images, they are not effective when combined. Specifically, the art of filter processing of binarized error data is effective in reducing the reticulation pattern because the error amplitude can be changed, but is ineffective for line/text images because the error diffusion cannot be controlled.